Using the HTTP Request Functions
The HTTP Request functions enable you to invoke Web service requests, as well as to add Headers to the HTTP Request, and retrieve Header information from the HTTP response.
For details on the available functions, see HTTP Request Library Object.
To test the HTTP Request functions:
-
Download the sample project here. The ZIP file includes a sample Real-Time Designer project.
-
Run the Real-Time Designer project. This project includes an instance of the HTTP Request object. For this sample, we've left the properties of the HTTP Request blank. In your solutions, define the values of these properties, as described in HTTP Request Library Object.
-
This project also includes a callout you can use to test some the functions. To view the syntax of a function before you test it, in the Callout Editor, right-click the function link in the callout, and select Replace > Action link.
The Action Link window appears, showing the function syntax. For example, if you right-click the Add Header function link, the following function syntax appears:
As you can see, this link posts the request to the Web server, and then adds a header called Sample with a value of Initial to the request.
-
Run the project. A Quick callout appears.
-
Click Quick to open the callout.
-
Open the Monitor.
-
Select Business Entities. In the Properties tab you will see two lists: Header List and Updated Header, both of which are empty. These lists are both receive the return value of the Retrieve All Headers and Header Values function. This function writes to the Header List list when you click Retrieve Headers in the callout, and to the Updated Header list when you click Update Header Value in the callout.
-
In the callout, click Add Header.
-
To check that the header was added, in the callout, click Retrieve Header.
The header value you added in the previous step (Sample, Initial) is added to the Header List.
-
To update the header value, in the callout, click Update Header Value.
The new header value (Sample, Second) is added to the Updated Header list.
If you click Retrieve Header again in the callout, the updated header value will be added to the Header List.